package com.jing.mapper;

import com.jing.pojo.FeedBack;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 陈书憬
 * @version 1.0
 * 2024/9/13
 */
@Mapper
public interface FeedBackMapper {

    @Select("select * from feedbacks ")
    List<FeedBack> list();

    @Insert("insert into feedbacks(user_id,nickname,message,created_at) values(#{userId},#{nickname},#{message},#{createdAt})")
    void save(Integer userId, String nickname, String message, LocalDateTime createdAt);
}
